<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
   /*（2）利用flex布局的方式，左右两栏的放大和缩小比例都设置为0，基础大小设置为固定的大小，中间一栏设置为auto*/
    .outer {
      display: flex;
      height: 100px;
      background-color: pink;
    }

    .left {
      width: 100px;
      background-color: tomato;
    }

    .right {
      width:200px;
      background-color: gold;
    }

    .middle {
      flex:1;
      background-color: lightgreen;
    }
  </style>
</head>

<body>
  <div class="outer ">
    <div class="left">left</div>
    <div class="middle">middle</div>
    <div class="right">right</div>
  </div>
</body>

</html>